<template>
	<view class="fullPage p30">
		<view class="container p30 border-r1 bf">
			<u-parse :html="content">内容持续更新中...</u-parse>
		</view>
	</view>
</template>

<script>
	import {
		protocol
	} from '@/api/public.js'
	export default {
		data() {
			return {
				type: 1,
				content: ''
			}
		},
		onLoad(e) {
			if (e.type) {
				this.type = e.type
			}
			this.setTit()
			this.protocol()

		},
		methods: {
			setTit() {
				let tit = ''
				switch (parseInt(this.type)) {
					case 1:
						tit = '押金说明'
						break
					case 2:
						tit = '用户协议'
						break
					case 3:
						tit = '充值协议'
						break
					case 4:
						tit = '隐私协议'
						break
					case 5:
						tit = '常见问题'
						break
					case 6:
						tit = '关于我们'
						break
				}
				uni.setNavigationBarTitle({
					title: tit
				})
			},
			async protocol() {
				const res = await protocol({
					type: this.type,
					appType: 2
				})
				this.content = res.data
			}
		}
	}
</script>

<style lang="scss"></style>